import { onMounted, ref } from "vue";
import { getDate } from "../../../utils/date";

export const useDate = function () {
  const dateRef = ref("");
  onMounted(() => {
    setInterval(() => {
      dateRef.value = getDate();
    }, 1000);
  });
  return {
    date: dateRef,
  };
};
